﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using ZedGraph;

namespace erse253_homework
{
    public partial class CompareVariograms : BaseWindowChart
    {
        public CompareVariograms(double[,] data, bool vertical, int tolerance)
        {
            InitializeComponent();
            double[] x1;
            double[] y1;
            double[] x2;
            double[] y2;
            Chart variogram = new Chart();
            variogram.Variogram(data, out x1, out y1, true, tolerance);
            variogram.Variogram(data, out x2, out y2, false, tolerance);
            base.ClearList();

            LineItem verticalLine = new LineItem("Variogram vertical direction", x1, y1, Color.Red, SymbolType.Circle);
            LineItem horizontalLine = new LineItem("Variogram horizontal direction", x2, y2, Color.Blue, SymbolType.Diamond);

            base.AddItem(verticalLine, "Variogram", "Distance |h|", "Value", "Variogram");
            base.AddItem(horizontalLine, "Variogram", "Distance |h|", "Value", "Variogram");


        }

        public CompareVariograms(double[,] data1, double[,] data2, bool vertical, int tolerance)
        {
            InitializeComponent();
            double[] x1;
            double[] y1;
            double[] x2;
            double[] y2;
            Chart variogram = new Chart();
            variogram.Variogram(data1, data2, out x1, out y1, true, tolerance);
            variogram.Variogram(data1, data2, out x2, out y2, false, tolerance);
            base.ClearList();

            LineItem verticalLine = new LineItem("Variogram vertical direction", x1, y1, Color.Red, SymbolType.Circle);
            LineItem horizontalLine = new LineItem("Variogram horizontal direction", x2, y2, Color.Blue, SymbolType.Diamond);

            base.AddItem(verticalLine, "Variogram", "Distance |h|", "Value", "Variogram");
            base.AddItem(horizontalLine, "Variogram", "Distance |h|", "Value", "Variogram");


        }
    }
}
